<!--
Copyright (c) 2019-2026, Hossein Moein
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
  notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
  notice, this list of conditions and the following disclaimer in the
  documentation and/or other materials provided with the distribution.
* Neither the name of Hossein Moein and/or the DataFrame nor the
  names of its contributors may be used to endorse or promote products
  derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL Hossein Moein BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<!DOCTYPE html>
<html>

<head>
<style>
body {
  background-image: linear-gradient(Azure, AliceBlue, GhostWhite, WhiteSmoke);
}
</style>
</head>


<style>
.frac {
    display: inline-block;
    position: relative;
    vertical-align: middle;
    letter-spacing: 0.001em;
    text-align: center;
}
.frac > span {
    display: block;
    padding-top: 0.01em;
    padding-bottom: 0.01em;
}
.frac span.bottom {
    border-top: thin solid white;
    padding-top: 0.4em;
    padding-bottom: 0.3em;
}
.frac span.symbol { display: none; }
</style>

<body style="font-family: Georgia, serif">

  <font size="+3">&#8592;</font> <a href="https://htmlpreview.github.io/?https://github.com/hosseinmoein/DataFrame/blob/master/docs/HTML/DataFrame.html">Back to Documentations</a><BR><BR>
  
  <table border="1">

    <tr bgcolor="lightblue">
      <th>Signature</th> <th>Description</th>
    </tr>
    <tr bgcolor="Azure">
      <td bgcolor="blue"> <font color="white">
        <PRE><B>
enum class  prob_dist_type : unsigned char  {
    arithmetic = 1,  // y<sub>i</sub> = <div class="frac"> <span>x<sub>i</sub></span> <span class="symbol">/</span> <span class="bottom">&sum; x<sub>i</sub></span> </div>        All values must be >= 0
    log = 2,         // y<sub>i</sub> = <div class="frac"> <span>log<sub>e</sub>(x<sub>i</sub>)</span> <span class="symbol">/</span> <span class="bottom">&sum; log<sub>e</sub>(x<sub>i</sub>)</span> </div>  All values must be >= 1  
    softmax = 3,     // y<sub>i</sub> = <div class="frac"> <span>e<sup>x<sub>i</sub></sup></span> <span class="symbol">/</span> <span class="bottom">&sum; e<sup>x<sub>i</sub></sup></span> </div>
    pow2 = 4,        // y<sub>i</sub> = <div class="frac"> <span>2<sup>x<sub>i</sub></sup></span> <span class="symbol">/</span> <span class="bottom">&sum; 2<sup>x<sub>i</sub></sup></span> </div>
    pow10 = 5,       // y<sub>i</sub> = <div class="frac"> <span>10<sup>x<sub>i</sub></sup></span> <span class="symbol">/</span> <span class="bottom">&sum; 10<sup>x<sub>i</sub></sup></span> </div>
}; </font></B></PRE>
      </td>
      <td>
        This specifies how to convert a vector of values to a probability distribution.<BR>
		Values in a probability distribution are between 0 and 1 and they all sum up to 1.<BR>
		Note that some methods do not work with negative values or zero.<BR>
      </td>
    </tr>

  </table>

  <table border="1">

    <tr bgcolor="lightblue">
      <th>Signature</th> <th>Description</th>
    </tr>
    <tr bgcolor="Azure">
      <td bgcolor="blue"> <font color="white">
        <PRE><B>
enum class  normalization_type : unsigned char  {

    none = 0,
    simple = 1,           // <div class="frac"> <span>V</span> <span class="symbol">/</span> <span class="bottom">&sum; x<sub>i</sub></span> </div>
    euclidean = 2,        // <div class="frac"> <span>V</span> <span class="symbol">/</span> <span class="bottom"><span>&radic;<span style="text-decoration:overline;">&sum; x<sub>i</sub><sup>2</sup></span></span> </div>
    maxi = 3,             // <div class="frac"> <span>V</span> <span class="symbol">/</span> <span class="bottom">MAX(x<sub>i</sub>)</span> </div>
    z_score = 4,          // <div class="frac"> <span>V - &mu;(V)</span> <span class="symbol">/</span> <span class="bottom">&sigma;(V)</span> </div>
    min_max = 5,          // <div class="frac"> <span>V - MIN(V)</span> <span class="symbol">/</span> <span class="bottom">MAX(V) - MIN(V)</span> </div>
    decimal_scaling = 6,  // <div class="frac"> <span>V</span> <span class="symbol">/</span> <span class="bottom">10<sup>MAX(x<sub>i</sub>)</sup></span> </div>
    log_transform = 7,    // Ln(V)
    root_transform = 8,   // &radic;<span style="text-decoration:overline;">V</span>
};
      </font></B></PRE>
      </td>
      <td>
        These are different kinds of normalization supported in <I>NormalizeVisitor</I>.<BR>
        <I>maxi</I> and <I>decimal_scaling</I> produce similar results.<BR>
      </td>
    </tr>

  </table>

  <BR>

  <table border="1">

    <tr bgcolor="lightblue">
      <th>Signature</th> <th>Description</th> <th>Parameters</th>
    </tr>

    <tr bgcolor="Azure">
      <td bgcolor="blue"> <font color="white">
        <PRE><B>#include &lt;DataFrame/DataFrameStatsVisitors.h&gt;

template&lt;typename T, typename I = unsigned long,
         std::size_t A = 0&gt;
struct ProbabilityDistVisitor;

// -------------------------------------

template&lt;typename T, typename I = unsigned long,
         std::size_t A = 0&gt;
using pd_v = ProbabilityDistVisitor&lt;T, I, A&gt;;
        </B></PRE></font>
      </td>
      <td>
        This is a "single action visitor", meaning it is passed the whole data vector in one call and you must use the single_act_visit() interface.<BR><BR>
        This class converts the given column of values into a probability distribution based on one of the above methods. Values in a probability distribution are between 0 and 1 and they all add up to 1.<BR>
        Please note that some of that methods require that values be only positive or above 1. If you don't adhere to the requirement, you will get garbage <BR>

        <I>
        <PRE>
    explicit
    ProbabilityDistVisitor(prob_dist_type pdtype);
        </PRE>
        </I>
      </td>
      <td width="30%">
        <B>T</B>: Column data type<BR>
        <B>I</B>: Index type<BR>
        <B>A</B>: Memory alignment boundary for vectors. Default is system default alignment<BR>
      </td>
    </tr>

    <tr bgcolor="Azure">
      <td bgcolor="blue"> <font color="white">
        <PRE><B>#include &lt;DataFrame/DataFrameStatsVisitors.h&gt;

template&lt;typename T, typename I = unsigned long,
         std::size_t A = 0&gt;
struct NormalizeVisitor;

// -------------------------------------

template&lt;typename T, typename I = unsigned long,
         std::size_t A = 0&gt;
using norm_v = NormalizeVisitor&lt;T, I, A&gt;;
        </B></PRE></font>
      </td>
      <td>
        This is a "single action visitor", meaning it is passed the whole data vector in one call and you must use the single_act_visit() interface.<BR><BR>
        This functor class normalizes column data using the method specified in the constructor.<BR>

        <I>
        <PRE>
    explicit
    NormalizeVisitor(normalization_type t = normalization_type::min_max);
        </PRE>
        </I>
      </td>
      <td width="30%">
        <B>T</B>: Column data type<BR>
        <B>I</B>: Index type<BR>
        <B>A</B>: Memory alignment boundary for vectors. Default is system default alignment<BR>
      </td>
    </tr>

    <tr bgcolor="Azure">
      <td bgcolor="blue"> <font color="white">
        <PRE><B>#include &lt;DataFrame/DataFrameStatsVisitors.h&gt;

template&lt;typename T, typename I = unsigned long,
         std::size_t A = 0&gt;
struct StandardizeVisitor;

// -------------------------------------

template&lt;typename T, typename I = unsigned long,
         std::size_t A = 0&gt;
using stand_v = StandardizeVisitor&lt;T, I, A&gt;;
        </B></PRE></font>
      </td>
      <td>
        This is a "single action visitor", meaning it is passed the whole data vector in one call and you must use the single_act_visit() interface.<BR><BR>
        This functor class standardizes column data by doing <I>y = (x - mean) / std</I>.<BR>
      </td>
      <td width="30%">
        <B>T</B>: Column data type<BR>
        <B>I</B>: Index type<BR>
        <B>A</B>: Memory alignment boundary for vectors. Default is system default alignment<BR>
      </td>
    </tr>

  </table>

<pre class="code_syntax" style="color:#000000;background:#ffffff00;"><span class="line_wrapper"><span style="color:#800000; font-weight:bold; ">static</span> <span style="color:#800000; font-weight:bold; ">void</span> test_ProbabilityDistVisitor<span style="color:#808030; ">(</span><span style="color:#808030; ">)</span>  <span style="color:#800080; ">{</span></span>
<span class="line_wrapper"></span>
<span class="line_wrapper">    <span style="color:#666616; ">std</span><span style="color:#800080; ">::</span><span style="color:#603000; ">cout</span> <span style="color:#808030; ">&lt;</span><span style="color:#808030; ">&lt;</span> <span style="color:#800000; ">"</span><span style="color:#0f69ff; ">\n</span><span style="color:#0000e6; ">Testing ProbabilityDistVisitor{  } ...</span><span style="color:#800000; ">"</span> <span style="color:#808030; ">&lt;</span><span style="color:#808030; ">&lt;</span> <span style="color:#666616; ">std</span><span style="color:#800080; ">::</span><span style="color:#603000; ">endl</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper"></span>
<span class="line_wrapper">    MyDataFrame                df<span style="color:#800080; ">;</span></span>
<span class="line_wrapper">    StlVecType<span style="color:#800080; ">&lt;</span><span style="color:#800000; font-weight:bold; ">unsigned</span> <span style="color:#800000; font-weight:bold; ">long</span><span style="color:#800080; ">&gt;</span>  idxvec <span style="color:#808030; ">=</span> <span style="color:#800080; ">{</span> <span style="color:#008c00; ">1</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">2</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">3</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">10</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">5</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">7</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">8</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">12</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">9</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">12</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">10</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">13</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">10</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">15</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">14</span> <span style="color:#800080; ">}</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper">    StlVecType<span style="color:#800080; ">&lt;</span><span style="color:#800000; font-weight:bold; ">double</span><span style="color:#800080; ">&gt;</span>         dblvec <span style="color:#808030; ">=</span> <span style="color:#800080; ">{</span> <span style="color:#008c00; ">0</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">1</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">2</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">3</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">4</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">5</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">6</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">7</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">8</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">9</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">10</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">11</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">12</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">13</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">14</span><span style="color:#800080; ">}</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper">    StlVecType<span style="color:#800080; ">&lt;</span><span style="color:#800000; font-weight:bold; ">double</span><span style="color:#800080; ">&gt;</span>         dblvec2 <span style="color:#808030; ">=</span> <span style="color:#800080; ">{</span> <span style="color:#008c00; ">1</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">2</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">3</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">4</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">5</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">6</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">7</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">8</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">9</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">10</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">11</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">12</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">13</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">14</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">15</span><span style="color:#800080; ">}</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper">    StlVecType<span style="color:#800080; ">&lt;</span><span style="color:#800000; font-weight:bold; ">double</span><span style="color:#800080; ">&gt;</span>         dblvec3 <span style="color:#808030; ">=</span> <span style="color:#800080; ">{</span> <span style="color:#008c00; ">0</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">1</span><span style="color:#808030; ">,</span> <span style="color:#808030; ">-</span><span style="color:#008c00; ">2</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">3</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">4</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">5</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">6</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">7</span><span style="color:#808030; ">,</span> <span style="color:#808030; ">-</span><span style="color:#008c00; ">8</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">9</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">10</span><span style="color:#808030; ">,</span> <span style="color:#808030; ">-</span><span style="color:#008c00; ">11</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">12</span><span style="color:#808030; ">,</span> <span style="color:#808030; ">-</span><span style="color:#008c00; ">13</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">14</span><span style="color:#800080; ">}</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper"></span>
<span class="line_wrapper">    df<span style="color:#808030; ">.</span>load_data<span style="color:#808030; ">(</span><span style="color:#666616; ">std</span><span style="color:#800080; ">::</span><span style="color:#603000; ">move</span><span style="color:#808030; ">(</span>idxvec<span style="color:#808030; ">)</span><span style="color:#808030; ">,</span></span>
<span class="line_wrapper">                 <span style="color:#666616; ">std</span><span style="color:#800080; ">::</span>make_pair<span style="color:#808030; ">(</span><span style="color:#800000; ">"</span><span style="color:#0000e6; ">dbl_col</span><span style="color:#800000; ">"</span><span style="color:#808030; ">,</span> dblvec<span style="color:#808030; ">)</span><span style="color:#808030; ">,</span></span>
<span class="line_wrapper">                 <span style="color:#666616; ">std</span><span style="color:#800080; ">::</span>make_pair<span style="color:#808030; ">(</span><span style="color:#800000; ">"</span><span style="color:#0000e6; ">dbl_col_2</span><span style="color:#800000; ">"</span><span style="color:#808030; ">,</span> dblvec2<span style="color:#808030; ">)</span><span style="color:#808030; ">,</span></span>
<span class="line_wrapper">                 <span style="color:#666616; ">std</span><span style="color:#800080; ">::</span>make_pair<span style="color:#808030; ">(</span><span style="color:#800000; ">"</span><span style="color:#0000e6; ">dbl_col_3</span><span style="color:#800000; ">"</span><span style="color:#808030; ">,</span> dblvec3<span style="color:#808030; ">)</span><span style="color:#808030; ">)</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper"></span>
<span class="line_wrapper">    pd_v<span style="color:#800080; ">&lt;</span><span style="color:#800000; font-weight:bold; ">double</span><span style="color:#808030; ">,</span> <span style="color:#800000; font-weight:bold; ">unsigned</span> <span style="color:#800000; font-weight:bold; ">long</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">256</span><span style="color:#800080; ">&gt;</span>    pd <span style="color:#800080; ">{</span> prob_dist_type<span style="color:#800080; ">::</span>arithmetic <span style="color:#800080; ">}</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper">    <span style="color:#800000; font-weight:bold; ">double</span>                              sum <span style="color:#800080; ">{</span> <span style="color:#008c00; ">0</span> <span style="color:#800080; ">}</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper"></span>
<span class="line_wrapper">    df<span style="color:#808030; ">.</span>single_act_visit<span style="color:#800080; ">&lt;</span><span style="color:#800000; font-weight:bold; ">double</span><span style="color:#800080; ">&gt;</span><span style="color:#808030; ">(</span><span style="color:#800000; ">"</span><span style="color:#0000e6; ">dbl_col</span><span style="color:#800000; ">"</span><span style="color:#808030; ">,</span> pd<span style="color:#808030; ">)</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper">    assert<span style="color:#808030; ">(</span>pd<span style="color:#808030; ">.</span>get_result<span style="color:#808030; ">(</span><span style="color:#808030; ">)</span><span style="color:#808030; ">.</span>size<span style="color:#808030; ">(</span><span style="color:#808030; ">)</span> <span style="color:#808030; ">=</span><span style="color:#808030; ">=</span> <span style="color:#008c00; ">15</span><span style="color:#808030; ">)</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper">    <span style="color:#800000; font-weight:bold; ">for</span> <span style="color:#808030; ">(</span><span style="color:#800000; font-weight:bold; ">const</span> <span style="color:#800000; font-weight:bold; ">auto</span> val <span style="color:#800080; ">:</span> pd<span style="color:#808030; ">.</span>get_result<span style="color:#808030; ">(</span><span style="color:#808030; ">)</span><span style="color:#808030; ">)</span>  <span style="color:#800080; ">{</span></span>
<span class="line_wrapper">        assert<span style="color:#808030; ">(</span>val <span style="color:#808030; ">&gt;</span><span style="color:#808030; ">=</span> <span style="color:#008c00; ">0</span> <span style="color:#808030; ">&amp;</span><span style="color:#808030; ">&amp;</span> val <span style="color:#808030; ">&lt;</span><span style="color:#808030; ">=</span> <span style="color:#008000; ">1.0</span><span style="color:#808030; ">)</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper">        sum <span style="color:#808030; ">+</span><span style="color:#808030; ">=</span> val<span style="color:#800080; ">;</span></span>
<span class="line_wrapper">    <span style="color:#800080; ">}</span></span>
<span class="line_wrapper">    assert<span style="color:#808030; ">(</span><span style="color:#666616; ">std</span><span style="color:#800080; ">::</span><span style="color:#603000; ">abs</span><span style="color:#808030; ">(</span>sum <span style="color:#808030; ">-</span> <span style="color:#008000; ">1.0</span><span style="color:#808030; ">)</span> <span style="color:#808030; ">&lt;</span> <span style="color:#008000; ">0.0001</span><span style="color:#808030; ">)</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper"></span>
<span class="line_wrapper">    pd_v<span style="color:#800080; ">&lt;</span><span style="color:#800000; font-weight:bold; ">double</span><span style="color:#808030; ">,</span> <span style="color:#800000; font-weight:bold; ">unsigned</span> <span style="color:#800000; font-weight:bold; ">long</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">256</span><span style="color:#800080; ">&gt;</span>    pd2 <span style="color:#800080; ">{</span> prob_dist_type<span style="color:#800080; ">::</span><span style="color:#603000; ">log</span> <span style="color:#800080; ">}</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper"></span>
<span class="line_wrapper">    df<span style="color:#808030; ">.</span>single_act_visit<span style="color:#800080; ">&lt;</span><span style="color:#800000; font-weight:bold; ">double</span><span style="color:#800080; ">&gt;</span><span style="color:#808030; ">(</span><span style="color:#800000; ">"</span><span style="color:#0000e6; ">dbl_col_2</span><span style="color:#800000; ">"</span><span style="color:#808030; ">,</span> pd2<span style="color:#808030; ">)</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper">    assert<span style="color:#808030; ">(</span>pd2<span style="color:#808030; ">.</span>get_result<span style="color:#808030; ">(</span><span style="color:#808030; ">)</span><span style="color:#808030; ">.</span>size<span style="color:#808030; ">(</span><span style="color:#808030; ">)</span> <span style="color:#808030; ">=</span><span style="color:#808030; ">=</span> <span style="color:#008c00; ">15</span><span style="color:#808030; ">)</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper">    sum <span style="color:#808030; ">=</span> <span style="color:#008c00; ">0</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper">    <span style="color:#800000; font-weight:bold; ">for</span> <span style="color:#808030; ">(</span><span style="color:#800000; font-weight:bold; ">const</span> <span style="color:#800000; font-weight:bold; ">auto</span> val <span style="color:#800080; ">:</span> pd2<span style="color:#808030; ">.</span>get_result<span style="color:#808030; ">(</span><span style="color:#808030; ">)</span><span style="color:#808030; ">)</span>  <span style="color:#800080; ">{</span></span>
<span class="line_wrapper">        assert<span style="color:#808030; ">(</span>val <span style="color:#808030; ">&gt;</span><span style="color:#808030; ">=</span> <span style="color:#008c00; ">0</span> <span style="color:#808030; ">&amp;</span><span style="color:#808030; ">&amp;</span> val <span style="color:#808030; ">&lt;</span><span style="color:#808030; ">=</span> <span style="color:#008000; ">1.0</span><span style="color:#808030; ">)</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper">        sum <span style="color:#808030; ">+</span><span style="color:#808030; ">=</span> val<span style="color:#800080; ">;</span></span>
<span class="line_wrapper">    <span style="color:#800080; ">}</span></span>
<span class="line_wrapper">    assert<span style="color:#808030; ">(</span><span style="color:#666616; ">std</span><span style="color:#800080; ">::</span><span style="color:#603000; ">abs</span><span style="color:#808030; ">(</span>sum <span style="color:#808030; ">-</span> <span style="color:#008000; ">1.0</span><span style="color:#808030; ">)</span> <span style="color:#808030; ">&lt;</span> <span style="color:#008000; ">0.0001</span><span style="color:#808030; ">)</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper"></span>
<span class="line_wrapper">    pd_v<span style="color:#800080; ">&lt;</span><span style="color:#800000; font-weight:bold; ">double</span><span style="color:#808030; ">,</span> <span style="color:#800000; font-weight:bold; ">unsigned</span> <span style="color:#800000; font-weight:bold; ">long</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">256</span><span style="color:#800080; ">&gt;</span>    pd3 <span style="color:#800080; ">{</span> prob_dist_type<span style="color:#800080; ">::</span>softmax <span style="color:#800080; ">}</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper"></span>
<span class="line_wrapper">    df<span style="color:#808030; ">.</span>single_act_visit<span style="color:#800080; ">&lt;</span><span style="color:#800000; font-weight:bold; ">double</span><span style="color:#800080; ">&gt;</span><span style="color:#808030; ">(</span><span style="color:#800000; ">"</span><span style="color:#0000e6; ">dbl_col_3</span><span style="color:#800000; ">"</span><span style="color:#808030; ">,</span> pd3<span style="color:#808030; ">)</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper">    assert<span style="color:#808030; ">(</span>pd3<span style="color:#808030; ">.</span>get_result<span style="color:#808030; ">(</span><span style="color:#808030; ">)</span><span style="color:#808030; ">.</span>size<span style="color:#808030; ">(</span><span style="color:#808030; ">)</span> <span style="color:#808030; ">=</span><span style="color:#808030; ">=</span> <span style="color:#008c00; ">15</span><span style="color:#808030; ">)</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper">    sum <span style="color:#808030; ">=</span> <span style="color:#008c00; ">0</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper">    <span style="color:#800000; font-weight:bold; ">for</span> <span style="color:#808030; ">(</span><span style="color:#800000; font-weight:bold; ">const</span> <span style="color:#800000; font-weight:bold; ">auto</span> val <span style="color:#800080; ">:</span> pd3<span style="color:#808030; ">.</span>get_result<span style="color:#808030; ">(</span><span style="color:#808030; ">)</span><span style="color:#808030; ">)</span>  <span style="color:#800080; ">{</span></span>
<span class="line_wrapper">        assert<span style="color:#808030; ">(</span>val <span style="color:#808030; ">&gt;</span><span style="color:#808030; ">=</span> <span style="color:#008c00; ">0</span> <span style="color:#808030; ">&amp;</span><span style="color:#808030; ">&amp;</span> val <span style="color:#808030; ">&lt;</span><span style="color:#808030; ">=</span> <span style="color:#008000; ">1.0</span><span style="color:#808030; ">)</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper">        sum <span style="color:#808030; ">+</span><span style="color:#808030; ">=</span> val<span style="color:#800080; ">;</span></span>
<span class="line_wrapper">    <span style="color:#800080; ">}</span></span>
<span class="line_wrapper">    assert<span style="color:#808030; ">(</span><span style="color:#666616; ">std</span><span style="color:#800080; ">::</span><span style="color:#603000; ">abs</span><span style="color:#808030; ">(</span>sum <span style="color:#808030; ">-</span> <span style="color:#008000; ">1.0</span><span style="color:#808030; ">)</span> <span style="color:#808030; ">&lt;</span> <span style="color:#008000; ">0.0001</span><span style="color:#808030; ">)</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper"></span>
<span class="line_wrapper">    pd_v<span style="color:#800080; ">&lt;</span><span style="color:#800000; font-weight:bold; ">double</span><span style="color:#808030; ">,</span> <span style="color:#800000; font-weight:bold; ">unsigned</span> <span style="color:#800000; font-weight:bold; ">long</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">256</span><span style="color:#800080; ">&gt;</span>    pd4 <span style="color:#800080; ">{</span> prob_dist_type<span style="color:#800080; ">::</span>pow2 <span style="color:#800080; ">}</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper"></span>
<span class="line_wrapper">    df<span style="color:#808030; ">.</span>single_act_visit<span style="color:#800080; ">&lt;</span><span style="color:#800000; font-weight:bold; ">double</span><span style="color:#800080; ">&gt;</span><span style="color:#808030; ">(</span><span style="color:#800000; ">"</span><span style="color:#0000e6; ">dbl_col_3</span><span style="color:#800000; ">"</span><span style="color:#808030; ">,</span> pd4<span style="color:#808030; ">)</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper">    assert<span style="color:#808030; ">(</span>pd4<span style="color:#808030; ">.</span>get_result<span style="color:#808030; ">(</span><span style="color:#808030; ">)</span><span style="color:#808030; ">.</span>size<span style="color:#808030; ">(</span><span style="color:#808030; ">)</span> <span style="color:#808030; ">=</span><span style="color:#808030; ">=</span> <span style="color:#008c00; ">15</span><span style="color:#808030; ">)</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper">    sum <span style="color:#808030; ">=</span> <span style="color:#008c00; ">0</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper">    <span style="color:#800000; font-weight:bold; ">for</span> <span style="color:#808030; ">(</span><span style="color:#800000; font-weight:bold; ">const</span> <span style="color:#800000; font-weight:bold; ">auto</span> val <span style="color:#800080; ">:</span> pd4<span style="color:#808030; ">.</span>get_result<span style="color:#808030; ">(</span><span style="color:#808030; ">)</span><span style="color:#808030; ">)</span>  <span style="color:#800080; ">{</span></span>
<span class="line_wrapper">        assert<span style="color:#808030; ">(</span>val <span style="color:#808030; ">&gt;</span><span style="color:#808030; ">=</span> <span style="color:#008c00; ">0</span> <span style="color:#808030; ">&amp;</span><span style="color:#808030; ">&amp;</span> val <span style="color:#808030; ">&lt;</span><span style="color:#808030; ">=</span> <span style="color:#008000; ">1.0</span><span style="color:#808030; ">)</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper">        sum <span style="color:#808030; ">+</span><span style="color:#808030; ">=</span> val<span style="color:#800080; ">;</span></span>
<span class="line_wrapper">    <span style="color:#800080; ">}</span></span>
<span class="line_wrapper">    assert<span style="color:#808030; ">(</span><span style="color:#666616; ">std</span><span style="color:#800080; ">::</span><span style="color:#603000; ">abs</span><span style="color:#808030; ">(</span>sum <span style="color:#808030; ">-</span> <span style="color:#008000; ">1.0</span><span style="color:#808030; ">)</span> <span style="color:#808030; ">&lt;</span> <span style="color:#008000; ">0.0001</span><span style="color:#808030; ">)</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper"></span>
<span class="line_wrapper">    pd_v<span style="color:#800080; ">&lt;</span><span style="color:#800000; font-weight:bold; ">double</span><span style="color:#808030; ">,</span> <span style="color:#800000; font-weight:bold; ">unsigned</span> <span style="color:#800000; font-weight:bold; ">long</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">256</span><span style="color:#800080; ">&gt;</span>    pd5 <span style="color:#800080; ">{</span> prob_dist_type<span style="color:#800080; ">::</span>pow10 <span style="color:#800080; ">}</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper"></span>
<span class="line_wrapper">    df<span style="color:#808030; ">.</span>single_act_visit<span style="color:#800080; ">&lt;</span><span style="color:#800000; font-weight:bold; ">double</span><span style="color:#800080; ">&gt;</span><span style="color:#808030; ">(</span><span style="color:#800000; ">"</span><span style="color:#0000e6; ">dbl_col_3</span><span style="color:#800000; ">"</span><span style="color:#808030; ">,</span> pd5<span style="color:#808030; ">)</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper">    assert<span style="color:#808030; ">(</span>pd5<span style="color:#808030; ">.</span>get_result<span style="color:#808030; ">(</span><span style="color:#808030; ">)</span><span style="color:#808030; ">.</span>size<span style="color:#808030; ">(</span><span style="color:#808030; ">)</span> <span style="color:#808030; ">=</span><span style="color:#808030; ">=</span> <span style="color:#008c00; ">15</span><span style="color:#808030; ">)</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper">    sum <span style="color:#808030; ">=</span> <span style="color:#008c00; ">0</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper">    <span style="color:#800000; font-weight:bold; ">for</span> <span style="color:#808030; ">(</span><span style="color:#800000; font-weight:bold; ">const</span> <span style="color:#800000; font-weight:bold; ">auto</span> val <span style="color:#800080; ">:</span> pd5<span style="color:#808030; ">.</span>get_result<span style="color:#808030; ">(</span><span style="color:#808030; ">)</span><span style="color:#808030; ">)</span>  <span style="color:#800080; ">{</span></span>
<span class="line_wrapper">        assert<span style="color:#808030; ">(</span>val <span style="color:#808030; ">&gt;</span><span style="color:#808030; ">=</span> <span style="color:#008c00; ">0</span> <span style="color:#808030; ">&amp;</span><span style="color:#808030; ">&amp;</span> val <span style="color:#808030; ">&lt;</span><span style="color:#808030; ">=</span> <span style="color:#008000; ">1.0</span><span style="color:#808030; ">)</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper">        sum <span style="color:#808030; ">+</span><span style="color:#808030; ">=</span> val<span style="color:#800080; ">;</span></span>
<span class="line_wrapper">    <span style="color:#800080; ">}</span></span>
<span class="line_wrapper">    assert<span style="color:#808030; ">(</span><span style="color:#666616; ">std</span><span style="color:#800080; ">::</span><span style="color:#603000; ">abs</span><span style="color:#808030; ">(</span>sum <span style="color:#808030; ">-</span> <span style="color:#008000; ">1.0</span><span style="color:#808030; ">)</span> <span style="color:#808030; ">&lt;</span> <span style="color:#008000; ">0.0001</span><span style="color:#808030; ">)</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper"><span style="color:#800080; ">}</span></span>
<span class="line_wrapper"></span>
<span class="line_wrapper"><span style="color:#696969; ">// -----------------------------------------------------------------------------</span></span>
<span class="line_wrapper"></span></pre>
<pre class="code_syntax" style="color:#000000;background:#ffffff00;"><span class="line_wrapper"><span style="color:#800000; font-weight:bold; ">static</span> <span style="color:#800000; font-weight:bold; ">void</span> test_NormalizeVisitor<span style="color:#808030; ">(</span><span style="color:#808030; ">)</span>  <span style="color:#800080; ">{</span></span>
<span class="line_wrapper"></span>
<span class="line_wrapper">    <span style="color:#666616; ">std</span><span style="color:#800080; ">::</span><span style="color:#603000; ">cout</span> <span style="color:#808030; ">&lt;</span><span style="color:#808030; ">&lt;</span> <span style="color:#800000; ">"</span><span style="color:#0f69ff; ">\n</span><span style="color:#0000e6; ">Testing NormalizeVisitor{ } ...</span><span style="color:#800000; ">"</span> <span style="color:#808030; ">&lt;</span><span style="color:#808030; ">&lt;</span> <span style="color:#666616; ">std</span><span style="color:#800080; ">::</span><span style="color:#603000; ">endl</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper"></span>
<span class="line_wrapper">    StlVecType<span style="color:#800080; ">&lt;</span><span style="color:#800000; font-weight:bold; ">unsigned</span> <span style="color:#800000; font-weight:bold; ">long</span><span style="color:#800080; ">&gt;</span>  ulgvec2 <span style="color:#808030; ">=</span></span>
<span class="line_wrapper">        <span style="color:#800080; ">{</span> <span style="color:#008c00; ">123450</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">123451</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">123452</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">123450</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">123455</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">123450</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">123449</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">123450</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">123451</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">123450</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">123452</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">123450</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">123455</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">123450</span><span style="color:#808030; ">,</span></span>
<span class="line_wrapper">          <span style="color:#008c00; ">123454</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">123450</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">123450</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">123457</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">123458</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">123459</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">123450</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">123441</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">123442</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">123432</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">123450</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">123450</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">123435</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">123450</span> <span style="color:#800080; ">}</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper">    StlVecType<span style="color:#800080; ">&lt;</span><span style="color:#800000; font-weight:bold; ">double</span><span style="color:#800080; ">&gt;</span>         dblvec <span style="color:#808030; ">=</span></span>
<span class="line_wrapper">        <span style="color:#800080; ">{</span> <span style="color:#008000; ">1.2345</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">2.2345</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">3.2345</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">4.2345</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">5.2345</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">3.0</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.9999</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">10.0</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">4.25</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.009</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">8.0</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">2.2222</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">3.3333</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">15.6</span><span style="color:#808030; ">,</span></span>
<span class="line_wrapper">          <span style="color:#008000; ">11.0</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">5.25</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">1.009</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">2.111</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">9.0</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">3.2222</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">4.3333</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">12.0</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">6.25</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">2.009</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">3.111</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">10.0</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">4.2222</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">5.3333</span> <span style="color:#800080; ">}</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper"></span>
<span class="line_wrapper">    MyDataFrame df<span style="color:#800080; ">;</span></span>
<span class="line_wrapper"></span>
<span class="line_wrapper">    df<span style="color:#808030; ">.</span>load_data<span style="color:#808030; ">(</span><span style="color:#666616; ">std</span><span style="color:#800080; ">::</span><span style="color:#603000; ">move</span><span style="color:#808030; ">(</span>ulgvec2<span style="color:#808030; ">)</span><span style="color:#808030; ">,</span> <span style="color:#666616; ">std</span><span style="color:#800080; ">::</span>make_pair<span style="color:#808030; ">(</span><span style="color:#800000; ">"</span><span style="color:#0000e6; ">dbl_col</span><span style="color:#800000; ">"</span><span style="color:#808030; ">,</span> dblvec<span style="color:#808030; ">)</span><span style="color:#808030; ">)</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper"></span>
<span class="line_wrapper">    <span style="color:#696969; ">// Do various Normalize testing</span></span>
<span class="line_wrapper">    <span style="color:#696969; ">//</span></span>
<span class="line_wrapper">    NormalizeVisitor<span style="color:#800080; ">&lt;</span><span style="color:#800000; font-weight:bold; ">double</span><span style="color:#808030; ">,</span> <span style="color:#800000; font-weight:bold; ">unsigned</span> <span style="color:#800000; font-weight:bold; ">long</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">64</span><span style="color:#800080; ">&gt;</span> norm_v<span style="color:#800080; ">;</span>  <span style="color:#696969; ">// min_max method</span></span>
<span class="line_wrapper">    <span style="color:#800000; font-weight:bold; ">auto</span>                                        result <span style="color:#808030; ">=</span> df<span style="color:#808030; ">.</span>single_act_visit<span style="color:#800080; ">&lt;</span><span style="color:#800000; font-weight:bold; ">double</span><span style="color:#800080; ">&gt;</span><span style="color:#808030; ">(</span><span style="color:#800000; ">"</span><span style="color:#0000e6; ">dbl_col</span><span style="color:#800000; ">"</span><span style="color:#808030; ">,</span> norm_v<span style="color:#808030; ">)</span><span style="color:#808030; ">.</span>get_result<span style="color:#808030; ">(</span><span style="color:#808030; ">)</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper">    StlVecType<span style="color:#800080; ">&lt;</span><span style="color:#800000; font-weight:bold; ">double</span><span style="color:#800080; ">&gt;</span>                          norm_result <span style="color:#808030; ">=</span> <span style="color:#800080; ">{</span></span>
<span class="line_wrapper">        <span style="color:#008000; ">0.078603</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.142743</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.206882</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.271022</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.335161</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.191841</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.0635559</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.640818</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.272016</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">0</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.512539</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.141954</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.213219</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">1</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.704958</span><span style="color:#808030; ">,</span></span>
<span class="line_wrapper">        <span style="color:#008000; ">0.336155</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.0641396</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.134821</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.576679</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.206093</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.277359</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.769098</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.400295</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.128279</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.198961</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.640818</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.270233</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.341498</span><span style="color:#808030; ">,</span></span>
<span class="line_wrapper">    <span style="color:#800080; ">}</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper">    <span style="color:#800000; font-weight:bold; ">double</span>                                      sum <span style="color:#800080; ">{</span> <span style="color:#008c00; ">0</span> <span style="color:#800080; ">}</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper"></span>
<span class="line_wrapper">    <span style="color:#800000; font-weight:bold; ">for</span> <span style="color:#808030; ">(</span><span style="color:#603000; ">size_t</span> i <span style="color:#808030; ">=</span> <span style="color:#008c00; ">0</span><span style="color:#800080; ">;</span> i <span style="color:#808030; ">&lt;</span> result<span style="color:#808030; ">.</span>size<span style="color:#808030; ">(</span><span style="color:#808030; ">)</span><span style="color:#800080; ">;</span> <span style="color:#808030; ">+</span><span style="color:#808030; ">+</span>i<span style="color:#808030; ">)</span></span>
<span class="line_wrapper">       assert<span style="color:#808030; ">(</span><span style="color:#603000; ">fabs</span><span style="color:#808030; ">(</span>result<span style="color:#808030; ">[</span>i<span style="color:#808030; ">]</span> <span style="color:#808030; ">-</span> norm_result<span style="color:#808030; ">[</span>i<span style="color:#808030; ">]</span><span style="color:#808030; ">)</span> <span style="color:#808030; ">&lt;</span> <span style="color:#008000; ">0.00001</span><span style="color:#808030; ">)</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper">    <span style="color:#800000; font-weight:bold; ">for</span> <span style="color:#808030; ">(</span><span style="color:#800000; font-weight:bold; ">const</span> <span style="color:#800000; font-weight:bold; ">auto</span> <span style="color:#808030; ">&amp;</span>r <span style="color:#800080; ">:</span> result<span style="color:#808030; ">)</span></span>
<span class="line_wrapper">        sum <span style="color:#808030; ">+</span><span style="color:#808030; ">=</span> r<span style="color:#800080; ">;</span></span>
<span class="line_wrapper">    assert<span style="color:#808030; ">(</span><span style="color:#603000; ">fabs</span><span style="color:#808030; ">(</span>sum <span style="color:#808030; ">-</span> <span style="color:#008000; ">9.11974</span><span style="color:#808030; ">)</span> <span style="color:#808030; ">&lt;</span> <span style="color:#008000; ">0.00001</span><span style="color:#808030; ">)</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper"></span>
<span class="line_wrapper">    <span style="color:#696969; ">//</span></span>
<span class="line_wrapper">    NormalizeVisitor<span style="color:#800080; ">&lt;</span><span style="color:#800000; font-weight:bold; ">double</span><span style="color:#808030; ">,</span> <span style="color:#800000; font-weight:bold; ">unsigned</span> <span style="color:#800000; font-weight:bold; ">long</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">64</span><span style="color:#800080; ">&gt;</span> norm_simple <span style="color:#800080; ">{</span> normalization_type<span style="color:#800080; ">::</span>simple <span style="color:#800080; ">}</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper">    StlVecType<span style="color:#800080; ">&lt;</span><span style="color:#800000; font-weight:bold; ">double</span><span style="color:#800080; ">&gt;</span>                          result_simple <span style="color:#808030; ">=</span> <span style="color:#800080; ">{</span></span>
<span class="line_wrapper">        <span style="color:#008000; ">0.00866693</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.0156875</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.0227081</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.0297287</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.0367493</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.0210618</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.0070199</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.070206</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.0298376</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">6.31854e-05</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.0561648</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.0156012</span><span style="color:#808030; ">,</span></span>
<span class="line_wrapper">        <span style="color:#008000; ">0.0234018</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.109521</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.0772266</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.0368582</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.00708379</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.0148205</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.0631854</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.0226218</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.0304224</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.0842472</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.0438788</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.0141044</span><span style="color:#808030; ">,</span></span>
<span class="line_wrapper">        <span style="color:#008000; ">0.0218411</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.070206</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.0296424</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.037443</span></span>
<span class="line_wrapper">    <span style="color:#800080; ">}</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper"></span>
<span class="line_wrapper">    result <span style="color:#808030; ">=</span> df<span style="color:#808030; ">.</span>single_act_visit<span style="color:#800080; ">&lt;</span><span style="color:#800000; font-weight:bold; ">double</span><span style="color:#800080; ">&gt;</span><span style="color:#808030; ">(</span><span style="color:#800000; ">"</span><span style="color:#0000e6; ">dbl_col</span><span style="color:#800000; ">"</span><span style="color:#808030; ">,</span> norm_simple<span style="color:#808030; ">)</span><span style="color:#808030; ">.</span>get_result<span style="color:#808030; ">(</span><span style="color:#808030; ">)</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper">    <span style="color:#800000; font-weight:bold; ">for</span> <span style="color:#808030; ">(</span><span style="color:#603000; ">size_t</span> i <span style="color:#808030; ">=</span> <span style="color:#008c00; ">0</span><span style="color:#800080; ">;</span> i <span style="color:#808030; ">&lt;</span> result<span style="color:#808030; ">.</span>size<span style="color:#808030; ">(</span><span style="color:#808030; ">)</span><span style="color:#800080; ">;</span> <span style="color:#808030; ">+</span><span style="color:#808030; ">+</span>i<span style="color:#808030; ">)</span></span>
<span class="line_wrapper">       assert<span style="color:#808030; ">(</span><span style="color:#603000; ">fabs</span><span style="color:#808030; ">(</span>result<span style="color:#808030; ">[</span>i<span style="color:#808030; ">]</span> <span style="color:#808030; ">-</span> result_simple<span style="color:#808030; ">[</span>i<span style="color:#808030; ">]</span><span style="color:#808030; ">)</span> <span style="color:#808030; ">&lt;</span> <span style="color:#008000; ">0.00001</span><span style="color:#808030; ">)</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper">    sum <span style="color:#808030; ">=</span> <span style="color:#008c00; ">0</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper">    <span style="color:#800000; font-weight:bold; ">for</span> <span style="color:#808030; ">(</span><span style="color:#800000; font-weight:bold; ">const</span> <span style="color:#800000; font-weight:bold; ">auto</span> <span style="color:#808030; ">&amp;</span>r <span style="color:#800080; ">:</span> result<span style="color:#808030; ">)</span></span>
<span class="line_wrapper">        sum <span style="color:#808030; ">+</span><span style="color:#808030; ">=</span> r<span style="color:#800080; ">;</span></span>
<span class="line_wrapper">    assert<span style="color:#808030; ">(</span>sum <span style="color:#808030; ">=</span><span style="color:#808030; ">=</span> <span style="color:#008000; ">1.0</span><span style="color:#808030; ">)</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper"></span>
<span class="line_wrapper">    <span style="color:#696969; ">//</span></span>
<span class="line_wrapper">    NormalizeVisitor<span style="color:#800080; ">&lt;</span><span style="color:#800000; font-weight:bold; ">double</span><span style="color:#808030; ">,</span> <span style="color:#800000; font-weight:bold; ">unsigned</span> <span style="color:#800000; font-weight:bold; ">long</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">64</span><span style="color:#800080; ">&gt;</span> norm_euclidean <span style="color:#800080; ">{</span> normalization_type<span style="color:#800080; ">::</span>euclidean <span style="color:#800080; ">}</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper">    StlVecType<span style="color:#800080; ">&lt;</span><span style="color:#800000; font-weight:bold; ">double</span><span style="color:#800080; ">&gt;</span>                          result_euclidean <span style="color:#808030; ">=</span> <span style="color:#800080; ">{</span></span>
<span class="line_wrapper">        <span style="color:#008000; ">0.0368709</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.0667379</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.0966049</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.126472</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.156339</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.0896011</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.029864</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.29867</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.126935</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.000268803</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.238936</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.0663705</span><span style="color:#808030; ">,</span></span>
<span class="line_wrapper">        <span style="color:#008000; ">0.0995558</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.465926</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.328537</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.156802</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.0301358</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.0630493</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.268803</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.0962376</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.129423</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.358404</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.186669</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.0600029</span><span style="color:#808030; ">,</span></span>
<span class="line_wrapper">        <span style="color:#008000; ">0.0929163</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.29867</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.126105</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.15929</span></span>
<span class="line_wrapper">    <span style="color:#800080; ">}</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper"></span>
<span class="line_wrapper">    result <span style="color:#808030; ">=</span> df<span style="color:#808030; ">.</span>single_act_visit<span style="color:#800080; ">&lt;</span><span style="color:#800000; font-weight:bold; ">double</span><span style="color:#800080; ">&gt;</span><span style="color:#808030; ">(</span><span style="color:#800000; ">"</span><span style="color:#0000e6; ">dbl_col</span><span style="color:#800000; ">"</span><span style="color:#808030; ">,</span> norm_euclidean<span style="color:#808030; ">)</span><span style="color:#808030; ">.</span>get_result<span style="color:#808030; ">(</span><span style="color:#808030; ">)</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper">    <span style="color:#800000; font-weight:bold; ">for</span> <span style="color:#808030; ">(</span><span style="color:#603000; ">size_t</span> i <span style="color:#808030; ">=</span> <span style="color:#008c00; ">0</span><span style="color:#800080; ">;</span> i <span style="color:#808030; ">&lt;</span> result<span style="color:#808030; ">.</span>size<span style="color:#808030; ">(</span><span style="color:#808030; ">)</span><span style="color:#800080; ">;</span> <span style="color:#808030; ">+</span><span style="color:#808030; ">+</span>i<span style="color:#808030; ">)</span></span>
<span class="line_wrapper">       assert<span style="color:#808030; ">(</span><span style="color:#603000; ">fabs</span><span style="color:#808030; ">(</span>result<span style="color:#808030; ">[</span>i<span style="color:#808030; ">]</span> <span style="color:#808030; ">-</span> result_euclidean<span style="color:#808030; ">[</span>i<span style="color:#808030; ">]</span><span style="color:#808030; ">)</span> <span style="color:#808030; ">&lt;</span> <span style="color:#008000; ">0.00001</span><span style="color:#808030; ">)</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper">    sum <span style="color:#808030; ">=</span> <span style="color:#008c00; ">0</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper">    <span style="color:#800000; font-weight:bold; ">for</span> <span style="color:#808030; ">(</span><span style="color:#800000; font-weight:bold; ">const</span> <span style="color:#800000; font-weight:bold; ">auto</span> <span style="color:#808030; ">&amp;</span>r <span style="color:#800080; ">:</span> result<span style="color:#808030; ">)</span></span>
<span class="line_wrapper">        sum <span style="color:#808030; ">+</span><span style="color:#808030; ">=</span> r<span style="color:#800080; ">;</span></span>
<span class="line_wrapper">    assert<span style="color:#808030; ">(</span><span style="color:#603000; ">fabs</span><span style="color:#808030; ">(</span>sum <span style="color:#808030; ">-</span> <span style="color:#008000; ">4.2542</span><span style="color:#808030; ">)</span> <span style="color:#808030; ">&lt;</span> <span style="color:#008000; ">0.0001</span><span style="color:#808030; ">)</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper"></span>
<span class="line_wrapper">    <span style="color:#696969; ">//</span></span>
<span class="line_wrapper">    NormalizeVisitor<span style="color:#800080; ">&lt;</span><span style="color:#800000; font-weight:bold; ">double</span><span style="color:#808030; ">,</span> <span style="color:#800000; font-weight:bold; ">unsigned</span> <span style="color:#800000; font-weight:bold; ">long</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">64</span><span style="color:#800080; ">&gt;</span> norm_maxi <span style="color:#800080; ">{</span> normalization_type<span style="color:#800080; ">::</span>maxi <span style="color:#800080; ">}</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper">    StlVecType<span style="color:#800080; ">&lt;</span><span style="color:#800000; font-weight:bold; ">double</span><span style="color:#800080; ">&gt;</span>                          result_maxi <span style="color:#808030; ">=</span> <span style="color:#800080; ">{</span></span>
<span class="line_wrapper">        <span style="color:#008000; ">0.0791346</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.143237</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.20734</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.271442</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.335545</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.192308</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.0640962</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.641026</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.272436</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.000576923</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.512821</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.142449</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.213673</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">1</span><span style="color:#808030; ">,</span></span>
<span class="line_wrapper">        <span style="color:#008000; ">0.705128</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.336538</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.0646795</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.135321</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.576923</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.206551</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.277776</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.769231</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.400641</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.128782</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.199423</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.641026</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.270654</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.341878</span></span>
<span class="line_wrapper">    <span style="color:#800080; ">}</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper"></span>
<span class="line_wrapper">    result <span style="color:#808030; ">=</span> df<span style="color:#808030; ">.</span>single_act_visit<span style="color:#800080; ">&lt;</span><span style="color:#800000; font-weight:bold; ">double</span><span style="color:#800080; ">&gt;</span><span style="color:#808030; ">(</span><span style="color:#800000; ">"</span><span style="color:#0000e6; ">dbl_col</span><span style="color:#800000; ">"</span><span style="color:#808030; ">,</span> norm_maxi<span style="color:#808030; ">)</span><span style="color:#808030; ">.</span>get_result<span style="color:#808030; ">(</span><span style="color:#808030; ">)</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper">    <span style="color:#800000; font-weight:bold; ">for</span> <span style="color:#808030; ">(</span><span style="color:#603000; ">size_t</span> i <span style="color:#808030; ">=</span> <span style="color:#008c00; ">0</span><span style="color:#800080; ">;</span> i <span style="color:#808030; ">&lt;</span> result<span style="color:#808030; ">.</span>size<span style="color:#808030; ">(</span><span style="color:#808030; ">)</span><span style="color:#800080; ">;</span> <span style="color:#808030; ">+</span><span style="color:#808030; ">+</span>i<span style="color:#808030; ">)</span></span>
<span class="line_wrapper">       assert<span style="color:#808030; ">(</span><span style="color:#603000; ">fabs</span><span style="color:#808030; ">(</span>result<span style="color:#808030; ">[</span>i<span style="color:#808030; ">]</span> <span style="color:#808030; ">-</span> result_maxi<span style="color:#808030; ">[</span>i<span style="color:#808030; ">]</span><span style="color:#808030; ">)</span> <span style="color:#808030; ">&lt;</span> <span style="color:#008000; ">0.00001</span><span style="color:#808030; ">)</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper">    sum <span style="color:#808030; ">=</span> <span style="color:#008c00; ">0</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper">    <span style="color:#800000; font-weight:bold; ">for</span> <span style="color:#808030; ">(</span><span style="color:#800000; font-weight:bold; ">const</span> <span style="color:#800000; font-weight:bold; ">auto</span> <span style="color:#808030; ">&amp;</span>r <span style="color:#800080; ">:</span> result<span style="color:#808030; ">)</span></span>
<span class="line_wrapper">        sum <span style="color:#808030; ">+</span><span style="color:#808030; ">=</span> r<span style="color:#800080; ">;</span></span>
<span class="line_wrapper">    assert<span style="color:#808030; ">(</span><span style="color:#603000; ">fabs</span><span style="color:#808030; ">(</span>sum <span style="color:#808030; ">-</span> <span style="color:#008000; ">9.13063</span><span style="color:#808030; ">)</span> <span style="color:#808030; ">&lt;</span> <span style="color:#008000; ">0.00001</span><span style="color:#808030; ">)</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper"></span>
<span class="line_wrapper">    <span style="color:#696969; ">//</span></span>
<span class="line_wrapper">    NormalizeVisitor<span style="color:#800080; ">&lt;</span><span style="color:#800000; font-weight:bold; ">double</span><span style="color:#808030; ">,</span> <span style="color:#800000; font-weight:bold; ">unsigned</span> <span style="color:#800000; font-weight:bold; ">long</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">64</span><span style="color:#800080; ">&gt;</span> norm_z_score <span style="color:#800080; ">{</span> normalization_type<span style="color:#800080; ">::</span>z_score <span style="color:#800080; ">}</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper">    StlVecType<span style="color:#800080; ">&lt;</span><span style="color:#800000; font-weight:bold; ">double</span><span style="color:#800080; ">&gt;</span>                          result_z_score <span style="color:#808030; ">=</span> <span style="color:#800080; ">{</span></span>
<span class="line_wrapper">        <span style="color:#808030; ">-</span><span style="color:#008000; ">1.00542</span><span style="color:#808030; ">,</span> <span style="color:#808030; ">-</span><span style="color:#008000; ">0.744444</span><span style="color:#808030; ">,</span> <span style="color:#808030; ">-</span><span style="color:#008000; ">0.48347</span><span style="color:#808030; ">,</span> <span style="color:#808030; ">-</span><span style="color:#008000; ">0.222497</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.0384758</span><span style="color:#808030; ">,</span> <span style="color:#808030; ">-</span><span style="color:#008000; ">0.544669</span><span style="color:#808030; ">,</span> <span style="color:#808030; ">-</span><span style="color:#008000; ">1.06664</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">1.28214</span><span style="color:#808030; ">,</span> <span style="color:#808030; ">-</span><span style="color:#008000; ">0.218452</span><span style="color:#808030; ">,</span> <span style="color:#808030; ">-</span><span style="color:#008000; ">1.32524</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.760197</span><span style="color:#808030; ">,</span> <span style="color:#808030; ">-</span><span style="color:#008000; ">0.747654</span><span style="color:#808030; ">,</span> <span style="color:#808030; ">-</span><span style="color:#008000; ">0.457686</span><span style="color:#808030; ">,</span></span>
<span class="line_wrapper">        <span style="color:#008000; ">2.74359</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">1.54312</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.0425209</span><span style="color:#808030; ">,</span> <span style="color:#808030; ">-</span><span style="color:#008000; ">1.06427</span><span style="color:#808030; ">,</span> <span style="color:#808030; ">-</span><span style="color:#008000; ">0.776674</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">1.02117</span><span style="color:#808030; ">,</span> <span style="color:#808030; ">-</span><span style="color:#008000; ">0.48668</span><span style="color:#808030; ">,</span> <span style="color:#808030; ">-</span><span style="color:#008000; ">0.196713</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">1.80409</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.303494</span><span style="color:#808030; ">,</span> <span style="color:#808030; ">-</span><span style="color:#008000; ">0.803293</span><span style="color:#808030; ">,</span> <span style="color:#808030; ">-</span><span style="color:#008000; ">0.515701</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">1.28214</span><span style="color:#808030; ">,</span> <span style="color:#808030; ">-</span><span style="color:#008000; ">0.225707</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.06426</span></span>
<span class="line_wrapper">    <span style="color:#800080; ">}</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper"></span>
<span class="line_wrapper">    result <span style="color:#808030; ">=</span> df<span style="color:#808030; ">.</span>single_act_visit<span style="color:#800080; ">&lt;</span><span style="color:#800000; font-weight:bold; ">double</span><span style="color:#800080; ">&gt;</span><span style="color:#808030; ">(</span><span style="color:#800000; ">"</span><span style="color:#0000e6; ">dbl_col</span><span style="color:#800000; ">"</span><span style="color:#808030; ">,</span> norm_z_score<span style="color:#808030; ">)</span><span style="color:#808030; ">.</span>get_result<span style="color:#808030; ">(</span><span style="color:#808030; ">)</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper">    <span style="color:#800000; font-weight:bold; ">for</span> <span style="color:#808030; ">(</span><span style="color:#603000; ">size_t</span> i <span style="color:#808030; ">=</span> <span style="color:#008c00; ">0</span><span style="color:#800080; ">;</span> i <span style="color:#808030; ">&lt;</span> result<span style="color:#808030; ">.</span>size<span style="color:#808030; ">(</span><span style="color:#808030; ">)</span><span style="color:#800080; ">;</span> <span style="color:#808030; ">+</span><span style="color:#808030; ">+</span>i<span style="color:#808030; ">)</span></span>
<span class="line_wrapper">       assert<span style="color:#808030; ">(</span><span style="color:#603000; ">fabs</span><span style="color:#808030; ">(</span>result<span style="color:#808030; ">[</span>i<span style="color:#808030; ">]</span> <span style="color:#808030; ">-</span> result_z_score<span style="color:#808030; ">[</span>i<span style="color:#808030; ">]</span><span style="color:#808030; ">)</span> <span style="color:#808030; ">&lt;</span> <span style="color:#008000; ">0.00001</span><span style="color:#808030; ">)</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper">    sum <span style="color:#808030; ">=</span> <span style="color:#008c00; ">0</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper">    <span style="color:#800000; font-weight:bold; ">for</span> <span style="color:#808030; ">(</span><span style="color:#800000; font-weight:bold; ">const</span> <span style="color:#800000; font-weight:bold; ">auto</span> <span style="color:#808030; ">&amp;</span>r <span style="color:#800080; ">:</span> result<span style="color:#808030; ">)</span></span>
<span class="line_wrapper">        sum <span style="color:#808030; ">+</span><span style="color:#808030; ">=</span> r<span style="color:#800080; ">;</span></span>
<span class="line_wrapper">    assert<span style="color:#808030; ">(</span><span style="color:#603000; ">fabs</span><span style="color:#808030; ">(</span>sum <span style="color:#808030; ">-</span> <span style="color:#008000; ">0.0</span><span style="color:#808030; ">)</span> <span style="color:#808030; ">&lt;</span> <span style="color:#008000; ">0.000000000001</span><span style="color:#808030; ">)</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper"></span>
<span class="line_wrapper">    <span style="color:#696969; ">//</span></span>
<span class="line_wrapper">    NormalizeVisitor<span style="color:#800080; ">&lt;</span><span style="color:#800000; font-weight:bold; ">double</span><span style="color:#808030; ">,</span> <span style="color:#800000; font-weight:bold; ">unsigned</span> <span style="color:#800000; font-weight:bold; ">long</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">64</span><span style="color:#800080; ">&gt;</span> norm_decimal_scaling <span style="color:#800080; ">{</span> normalization_type<span style="color:#800080; ">::</span>decimal_scaling <span style="color:#800080; ">}</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper">    StlVecType<span style="color:#800080; ">&lt;</span><span style="color:#800000; font-weight:bold; ">double</span><span style="color:#800080; ">&gt;</span>                          result_decimal_scaling <span style="color:#808030; ">=</span> <span style="color:#800080; ">{</span></span>
<span class="line_wrapper">        <span style="color:#008000; ">0.00791346</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.0143237</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.020734</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.0271442</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.0335545</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.0192308</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.00640962</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.0641026</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.0272436</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">5.76923e-05</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.0512821</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.0142449</span><span style="color:#808030; ">,</span></span>
<span class="line_wrapper">        <span style="color:#008000; ">0.0213673</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.1</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.0705128</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.0336538</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.00646795</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.0135321</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.0576923</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.0206551</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.0277776</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.0769231</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.0400641</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.0128782</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.0199423</span><span style="color:#808030; ">,</span></span>
<span class="line_wrapper">        <span style="color:#008000; ">0.0641026</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.0270654</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.0341878</span></span>
<span class="line_wrapper">    <span style="color:#800080; ">}</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper"></span>
<span class="line_wrapper">    result <span style="color:#808030; ">=</span> df<span style="color:#808030; ">.</span>single_act_visit<span style="color:#800080; ">&lt;</span><span style="color:#800000; font-weight:bold; ">double</span><span style="color:#800080; ">&gt;</span><span style="color:#808030; ">(</span><span style="color:#800000; ">"</span><span style="color:#0000e6; ">dbl_col</span><span style="color:#800000; ">"</span><span style="color:#808030; ">,</span> norm_decimal_scaling<span style="color:#808030; ">)</span><span style="color:#808030; ">.</span>get_result<span style="color:#808030; ">(</span><span style="color:#808030; ">)</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper">    <span style="color:#800000; font-weight:bold; ">for</span> <span style="color:#808030; ">(</span><span style="color:#603000; ">size_t</span> i <span style="color:#808030; ">=</span> <span style="color:#008c00; ">0</span><span style="color:#800080; ">;</span> i <span style="color:#808030; ">&lt;</span> result<span style="color:#808030; ">.</span>size<span style="color:#808030; ">(</span><span style="color:#808030; ">)</span><span style="color:#800080; ">;</span> <span style="color:#808030; ">+</span><span style="color:#808030; ">+</span>i<span style="color:#808030; ">)</span></span>
<span class="line_wrapper">       assert<span style="color:#808030; ">(</span><span style="color:#603000; ">fabs</span><span style="color:#808030; ">(</span>result<span style="color:#808030; ">[</span>i<span style="color:#808030; ">]</span> <span style="color:#808030; ">-</span> result_decimal_scaling<span style="color:#808030; ">[</span>i<span style="color:#808030; ">]</span><span style="color:#808030; ">)</span> <span style="color:#808030; ">&lt;</span> <span style="color:#008000; ">0.00001</span><span style="color:#808030; ">)</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper">    sum <span style="color:#808030; ">=</span> <span style="color:#008c00; ">0</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper">    <span style="color:#800000; font-weight:bold; ">for</span> <span style="color:#808030; ">(</span><span style="color:#800000; font-weight:bold; ">const</span> <span style="color:#800000; font-weight:bold; ">auto</span> <span style="color:#808030; ">&amp;</span>r <span style="color:#800080; ">:</span> result<span style="color:#808030; ">)</span></span>
<span class="line_wrapper">        sum <span style="color:#808030; ">+</span><span style="color:#808030; ">=</span> r<span style="color:#800080; ">;</span></span>
<span class="line_wrapper">    assert<span style="color:#808030; ">(</span><span style="color:#603000; ">fabs</span><span style="color:#808030; ">(</span>sum <span style="color:#808030; ">-</span> <span style="color:#008000; ">0.91306</span><span style="color:#808030; ">)</span> <span style="color:#808030; ">&lt;</span> <span style="color:#008000; ">0.00001</span><span style="color:#808030; ">)</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper"></span>
<span class="line_wrapper">    <span style="color:#696969; ">//</span></span>
<span class="line_wrapper">    NormalizeVisitor<span style="color:#800080; ">&lt;</span><span style="color:#800000; font-weight:bold; ">double</span><span style="color:#808030; ">,</span> <span style="color:#800000; font-weight:bold; ">unsigned</span> <span style="color:#800000; font-weight:bold; ">long</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">64</span><span style="color:#800080; ">&gt;</span> norm_log_transform <span style="color:#800080; ">{</span> normalization_type<span style="color:#800080; ">::</span>log_transform <span style="color:#800080; ">}</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper">    StlVecType<span style="color:#800080; ">&lt;</span><span style="color:#800000; font-weight:bold; ">double</span><span style="color:#800080; ">&gt;</span>                          result_log_transform <span style="color:#808030; ">=</span> <span style="color:#800080; ">{</span></span>
<span class="line_wrapper">        <span style="color:#008000; ">0.210666</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.804017</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">1.17387</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">1.44327</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">1.65527</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">1.09861</span><span style="color:#808030; ">,</span> <span style="color:#808030; ">-</span><span style="color:#008000; ">0.000100005</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">2.30259</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">1.44692</span><span style="color:#808030; ">,</span> <span style="color:#808030; ">-</span><span style="color:#008000; ">4.71053</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">2.07944</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.798498</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">1.20396</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">2.74727</span><span style="color:#808030; ">,</span></span>
<span class="line_wrapper">        <span style="color:#008000; ">2.3979</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">1.65823</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.00895974</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.747162</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">2.19722</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">1.17006</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">1.46633</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">2.48491</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">1.83258</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.697637</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">1.13494</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">2.30259</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">1.44036</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">1.67397</span></span>
<span class="line_wrapper">    <span style="color:#800080; ">}</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper"></span>
<span class="line_wrapper">    result <span style="color:#808030; ">=</span> df<span style="color:#808030; ">.</span>single_act_visit<span style="color:#800080; ">&lt;</span><span style="color:#800000; font-weight:bold; ">double</span><span style="color:#800080; ">&gt;</span><span style="color:#808030; ">(</span><span style="color:#800000; ">"</span><span style="color:#0000e6; ">dbl_col</span><span style="color:#800000; ">"</span><span style="color:#808030; ">,</span> norm_log_transform<span style="color:#808030; ">)</span><span style="color:#808030; ">.</span>get_result<span style="color:#808030; ">(</span><span style="color:#808030; ">)</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper">    <span style="color:#800000; font-weight:bold; ">for</span> <span style="color:#808030; ">(</span><span style="color:#603000; ">size_t</span> i <span style="color:#808030; ">=</span> <span style="color:#008c00; ">0</span><span style="color:#800080; ">;</span> i <span style="color:#808030; ">&lt;</span> result<span style="color:#808030; ">.</span>size<span style="color:#808030; ">(</span><span style="color:#808030; ">)</span><span style="color:#800080; ">;</span> <span style="color:#808030; ">+</span><span style="color:#808030; ">+</span>i<span style="color:#808030; ">)</span></span>
<span class="line_wrapper">       assert<span style="color:#808030; ">(</span><span style="color:#603000; ">fabs</span><span style="color:#808030; ">(</span>result<span style="color:#808030; ">[</span>i<span style="color:#808030; ">]</span> <span style="color:#808030; ">-</span> result_log_transform<span style="color:#808030; ">[</span>i<span style="color:#808030; ">]</span><span style="color:#808030; ">)</span> <span style="color:#808030; ">&lt;</span> <span style="color:#008000; ">0.00001</span><span style="color:#808030; ">)</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper">    sum <span style="color:#808030; ">=</span> <span style="color:#008c00; ">0</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper">    <span style="color:#800000; font-weight:bold; ">for</span> <span style="color:#808030; ">(</span><span style="color:#800000; font-weight:bold; ">const</span> <span style="color:#800000; font-weight:bold; ">auto</span> <span style="color:#808030; ">&amp;</span>r <span style="color:#800080; ">:</span> result<span style="color:#808030; ">)</span></span>
<span class="line_wrapper">        sum <span style="color:#808030; ">+</span><span style="color:#808030; ">=</span> r<span style="color:#800080; ">;</span></span>
<span class="line_wrapper">    assert<span style="color:#808030; ">(</span><span style="color:#603000; ">fabs</span><span style="color:#808030; ">(</span>sum <span style="color:#808030; ">-</span> <span style="color:#008000; ">33.4666</span><span style="color:#808030; ">)</span> <span style="color:#808030; ">&lt;</span> <span style="color:#008000; ">0.0001</span><span style="color:#808030; ">)</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper"></span>
<span class="line_wrapper">    <span style="color:#696969; ">//</span></span>
<span class="line_wrapper">    NormalizeVisitor<span style="color:#800080; ">&lt;</span><span style="color:#800000; font-weight:bold; ">double</span><span style="color:#808030; ">,</span> <span style="color:#800000; font-weight:bold; ">unsigned</span> <span style="color:#800000; font-weight:bold; ">long</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">64</span><span style="color:#800080; ">&gt;</span> norm_root_transform <span style="color:#800080; ">{</span> normalization_type<span style="color:#800080; ">::</span>root_transform <span style="color:#800080; ">}</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper">    StlVecType<span style="color:#800080; ">&lt;</span><span style="color:#800000; font-weight:bold; ">double</span><span style="color:#800080; ">&gt;</span>                          result_root_transform <span style="color:#808030; ">=</span> <span style="color:#800080; ">{</span></span>
<span class="line_wrapper">        <span style="color:#008000; ">1.11108</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">1.49482</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">1.79847</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">2.05779</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">2.2879</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">1.73205</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.99995</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">3.16228</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">2.06155</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.0948683</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">2.82843</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">1.4907</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">1.82573</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">3.94968</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">3.31662</span><span style="color:#808030; ">,</span></span>
<span class="line_wrapper">        <span style="color:#008000; ">2.29129</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">1.00449</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">1.45293</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">3</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">1.79505</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">2.08166</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">3.4641</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">2.5</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">1.41739</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">1.7638</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">3.16228</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">2.0548</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">2.30939</span></span>
<span class="line_wrapper">    <span style="color:#800080; ">}</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper"></span>
<span class="line_wrapper">    result <span style="color:#808030; ">=</span> df<span style="color:#808030; ">.</span>single_act_visit<span style="color:#800080; ">&lt;</span><span style="color:#800000; font-weight:bold; ">double</span><span style="color:#800080; ">&gt;</span><span style="color:#808030; ">(</span><span style="color:#800000; ">"</span><span style="color:#0000e6; ">dbl_col</span><span style="color:#800000; ">"</span><span style="color:#808030; ">,</span> norm_root_transform<span style="color:#808030; ">)</span><span style="color:#808030; ">.</span>get_result<span style="color:#808030; ">(</span><span style="color:#808030; ">)</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper">    <span style="color:#800000; font-weight:bold; ">for</span> <span style="color:#808030; ">(</span><span style="color:#603000; ">size_t</span> i <span style="color:#808030; ">=</span> <span style="color:#008c00; ">0</span><span style="color:#800080; ">;</span> i <span style="color:#808030; ">&lt;</span> result<span style="color:#808030; ">.</span>size<span style="color:#808030; ">(</span><span style="color:#808030; ">)</span><span style="color:#800080; ">;</span> <span style="color:#808030; ">+</span><span style="color:#808030; ">+</span>i<span style="color:#808030; ">)</span></span>
<span class="line_wrapper">       assert<span style="color:#808030; ">(</span><span style="color:#603000; ">fabs</span><span style="color:#808030; ">(</span>result<span style="color:#808030; ">[</span>i<span style="color:#808030; ">]</span> <span style="color:#808030; ">-</span> result_root_transform<span style="color:#808030; ">[</span>i<span style="color:#808030; ">]</span><span style="color:#808030; ">)</span> <span style="color:#808030; ">&lt;</span> <span style="color:#008000; ">0.00001</span><span style="color:#808030; ">)</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper">    sum <span style="color:#808030; ">=</span> <span style="color:#008c00; ">0</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper">    <span style="color:#800000; font-weight:bold; ">for</span> <span style="color:#808030; ">(</span><span style="color:#800000; font-weight:bold; ">const</span> <span style="color:#800000; font-weight:bold; ">auto</span> <span style="color:#808030; ">&amp;</span>r <span style="color:#800080; ">:</span> result<span style="color:#808030; ">)</span></span>
<span class="line_wrapper">        sum <span style="color:#808030; ">+</span><span style="color:#808030; ">=</span> r<span style="color:#800080; ">;</span></span>
<span class="line_wrapper">    assert<span style="color:#808030; ">(</span><span style="color:#603000; ">fabs</span><span style="color:#808030; ">(</span>sum <span style="color:#808030; ">-</span> <span style="color:#008000; ">58.5091</span><span style="color:#808030; ">)</span> <span style="color:#808030; ">&lt;</span> <span style="color:#008000; ">0.0001</span><span style="color:#808030; ">)</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper"></span>
<span class="line_wrapper">    <span style="color:#696969; ">// Now do Standardize testing</span></span>
<span class="line_wrapper">    <span style="color:#696969; ">//</span></span>
<span class="line_wrapper">    StandardizeVisitor<span style="color:#800080; ">&lt;</span><span style="color:#800000; font-weight:bold; ">double</span><span style="color:#808030; ">,</span> <span style="color:#800000; font-weight:bold; ">unsigned</span> <span style="color:#800000; font-weight:bold; ">long</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">64</span><span style="color:#800080; ">&gt;</span>   stand_v<span style="color:#800080; ">;</span></span>
<span class="line_wrapper">    StlVecType<span style="color:#800080; ">&lt;</span><span style="color:#800000; font-weight:bold; ">double</span><span style="color:#800080; ">&gt;</span>                              stand_result <span style="color:#808030; ">=</span> <span style="color:#800080; ">{</span></span>
<span class="line_wrapper">        <span style="color:#808030; ">-</span><span style="color:#008000; ">1.00542</span><span style="color:#808030; ">,</span> <span style="color:#808030; ">-</span><span style="color:#008000; ">0.744444</span><span style="color:#808030; ">,</span> <span style="color:#808030; ">-</span><span style="color:#008000; ">0.48347</span><span style="color:#808030; ">,</span> <span style="color:#808030; ">-</span><span style="color:#008000; ">0.222497</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.0384758</span><span style="color:#808030; ">,</span> <span style="color:#808030; ">-</span><span style="color:#008000; ">0.544669</span><span style="color:#808030; ">,</span> <span style="color:#808030; ">-</span><span style="color:#008000; ">1.06664</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">1.28214</span><span style="color:#808030; ">,</span> <span style="color:#808030; ">-</span><span style="color:#008000; ">0.218452</span><span style="color:#808030; ">,</span> <span style="color:#808030; ">-</span><span style="color:#008000; ">1.32524</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.760197</span><span style="color:#808030; ">,</span> <span style="color:#808030; ">-</span><span style="color:#008000; ">0.747654</span><span style="color:#808030; ">,</span> <span style="color:#808030; ">-</span><span style="color:#008000; ">0.457686</span><span style="color:#808030; ">,</span></span>
<span class="line_wrapper">        <span style="color:#008000; ">2.74359</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">1.54312</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.0425209</span><span style="color:#808030; ">,</span> <span style="color:#808030; ">-</span><span style="color:#008000; ">1.06427</span><span style="color:#808030; ">,</span> <span style="color:#808030; ">-</span><span style="color:#008000; ">0.776674</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">1.02117</span><span style="color:#808030; ">,</span> <span style="color:#808030; ">-</span><span style="color:#008000; ">0.48668</span><span style="color:#808030; ">,</span> <span style="color:#808030; ">-</span><span style="color:#008000; ">0.196713</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">1.80409</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.303494</span><span style="color:#808030; ">,</span> <span style="color:#808030; ">-</span><span style="color:#008000; ">0.803293</span><span style="color:#808030; ">,</span> <span style="color:#808030; ">-</span><span style="color:#008000; ">0.515701</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">1.28214</span><span style="color:#808030; ">,</span> <span style="color:#808030; ">-</span><span style="color:#008000; ">0.225707</span><span style="color:#808030; ">,</span> <span style="color:#008000; ">0.06426</span></span>
<span class="line_wrapper">    <span style="color:#800080; ">}</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper"></span>
<span class="line_wrapper">    result <span style="color:#808030; ">=</span> df<span style="color:#808030; ">.</span>single_act_visit<span style="color:#800080; ">&lt;</span><span style="color:#800000; font-weight:bold; ">double</span><span style="color:#800080; ">&gt;</span><span style="color:#808030; ">(</span><span style="color:#800000; ">"</span><span style="color:#0000e6; ">dbl_col</span><span style="color:#800000; ">"</span><span style="color:#808030; ">,</span> stand_v<span style="color:#808030; ">)</span><span style="color:#808030; ">.</span>get_result<span style="color:#808030; ">(</span><span style="color:#808030; ">)</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper">    <span style="color:#800000; font-weight:bold; ">for</span> <span style="color:#808030; ">(</span><span style="color:#603000; ">size_t</span> i <span style="color:#808030; ">=</span> <span style="color:#008c00; ">0</span><span style="color:#800080; ">;</span> i <span style="color:#808030; ">&lt;</span> result<span style="color:#808030; ">.</span>size<span style="color:#808030; ">(</span><span style="color:#808030; ">)</span><span style="color:#800080; ">;</span> <span style="color:#808030; ">+</span><span style="color:#808030; ">+</span>i<span style="color:#808030; ">)</span></span>
<span class="line_wrapper">       assert<span style="color:#808030; ">(</span><span style="color:#603000; ">fabs</span><span style="color:#808030; ">(</span>result<span style="color:#808030; ">[</span>i<span style="color:#808030; ">]</span> <span style="color:#808030; ">-</span> stand_result<span style="color:#808030; ">[</span>i<span style="color:#808030; ">]</span><span style="color:#808030; ">)</span> <span style="color:#808030; ">&lt;</span> <span style="color:#008000; ">0.00001</span><span style="color:#808030; ">)</span><span style="color:#800080; ">;</span></span>
<span class="line_wrapper"><span style="color:#800080; ">}</span></span>
<span class="line_wrapper"></span></pre>

  <BR><img src="https://github.com/hosseinmoein/DataFrame/blob/master/docs/LionLookingUp.jpg?raw=true" alt="C++ DataFrame"
       width="200" height="200" style="float:right"/>

</body>
</html>

<!--
Local Variables:
mode:HTML
tab-width:4
c-basic-offset:4
End:
-->
